<?php

namespace Proj\ResmanBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class ProgramType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('level', 'choice', array('label' => 'Nivel', 'choices' => array('Licenta', 'Master')))
            ->add('profile', null, array('label' => 'Specializare'))
            ->add('duration', null, array('label' => 'Durata'))
            ->add('type', null, array('label' => 'Tip de studiu'))
            ->add('language', null, array('label' => 'Limbi de predare'))
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Proj\ResManBundle\Entity\AcademicProgram'
        ));
    }
    
    public function getName()
    {
        return 'proj_resmanbundle_programstype';
    }
}